<?php /* Smarty version Smarty-3.1.11, created on 2013-03-14 11:22:22
         compiled from "./smarty/templates/searchWidget.tpl" */ ?>
<?php /*%%SmartyHeaderCode:12981369965141b2eea4ce52-23674935%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b299cbf6c4370e3e9a15bca97f0b8983ee558a83' => 
    array (
      0 => './smarty/templates/searchWidget.tpl',
      1 => 1362501510,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '12981369965141b2eea4ce52-23674935',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'k' => 0,
    'roomNumber' => 0,
    'previousSearch' => 0,
    'i' => 0,
    'roomData' => 0,
    'j' => 0,
    'childrenAge' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_5141b2eebba9b1_73739015',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5141b2eebba9b1_73739015')) {function content_5141b2eebba9b1_73739015($_smarty_tpl) {?><script src="js/jquery_datepicker/jquery-1.8.0.js"></script>
<script src="js/jquery_datepicker/ui/jquery.ui.core.js"></script>
<script src="js/jquery_datepicker/ui/jquery.ui.widget.js"></script>
<script src="js/jquery_datepicker/ui/jquery.ui.datepicker.js"></script>
<script src="js/search_widget.js"></script>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
<script src="js/helper_functions.js"></script>

<div id="search-widget">

<form action="hotelResults.php" method="post" id="search_form">
    <div id="destination">
	<div id="input_destination_label">
            <label>
		Where would you like to go?
            </label>
	</div>
        <div id="input_destination">
            <input id="search_textbox" type="textbox" name="destination" onblur="checkDestination()" />
            <div id="search_error"></div>
	</div>
    </div>
    <table id="check_in_check_out">
        <tr>
            <td id="check-in"><span>Check-in</span><input type="textbox" id="checkin" name="check-in" readonly="true"/></td>
            <td id="check-out"><span>Check-out</span><input type="textbox" id="checkout" name="check-out" readonly="true"/></td>
        </tr>
        <tr>
            <td>
                <div id="date_error"></div>
            </td>
    </tr>
    </table>
    <div id="rooms">
        <?php $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['k']->step = 1;$_smarty_tpl->tpl_vars['k']->total = (int)ceil(($_smarty_tpl->tpl_vars['k']->step > 0 ? 8+1 - (1) : 1-(8)+1)/abs($_smarty_tpl->tpl_vars['k']->step));
if ($_smarty_tpl->tpl_vars['k']->total > 0){
for ($_smarty_tpl->tpl_vars['k']->value = 1, $_smarty_tpl->tpl_vars['k']->iteration = 1;$_smarty_tpl->tpl_vars['k']->iteration <= $_smarty_tpl->tpl_vars['k']->total;$_smarty_tpl->tpl_vars['k']->value += $_smarty_tpl->tpl_vars['k']->step, $_smarty_tpl->tpl_vars['k']->iteration++){
$_smarty_tpl->tpl_vars['k']->first = $_smarty_tpl->tpl_vars['k']->iteration == 1;$_smarty_tpl->tpl_vars['k']->last = $_smarty_tpl->tpl_vars['k']->iteration == $_smarty_tpl->tpl_vars['k']->total;?>
            <div id="room<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['k']->value<=$_smarty_tpl->tpl_vars['roomNumber']->value){?> style="display:inline;" <?php }else{ ?> style="display:none;" <?php }?> >
                
                <div class="adults">
                    <?php if ($_smarty_tpl->tpl_vars['k']->value==1){?><span class="label">Adults <span>(18+) </span></span><?php }?>
                    
                    <select id="rooms<?php echo $_smarty_tpl->tpl_vars['k']->value-1;?>
adultsCount" name="room<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
[adultsCount]">
                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['i']->step = 1;$_smarty_tpl->tpl_vars['i']->total = (int)ceil(($_smarty_tpl->tpl_vars['i']->step > 0 ? 4+1 - (1) : 1-(4)+1)/abs($_smarty_tpl->tpl_vars['i']->step));
if ($_smarty_tpl->tpl_vars['i']->total > 0){
for ($_smarty_tpl->tpl_vars['i']->value = 1, $_smarty_tpl->tpl_vars['i']->iteration = 1;$_smarty_tpl->tpl_vars['i']->iteration <= $_smarty_tpl->tpl_vars['i']->total;$_smarty_tpl->tpl_vars['i']->value += $_smarty_tpl->tpl_vars['i']->step, $_smarty_tpl->tpl_vars['i']->iteration++){
$_smarty_tpl->tpl_vars['i']->first = $_smarty_tpl->tpl_vars['i']->iteration == 1;$_smarty_tpl->tpl_vars['i']->last = $_smarty_tpl->tpl_vars['i']->iteration == $_smarty_tpl->tpl_vars['i']->total;?>
                            <?php if ($_smarty_tpl->tpl_vars['previousSearch']->value==false){?>
                                <option <?php if ($_smarty_tpl->tpl_vars['i']->value==2){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option>
                            <?php }elseif($_smarty_tpl->tpl_vars['previousSearch']->value==true&&$_smarty_tpl->tpl_vars['k']->value<=$_smarty_tpl->tpl_vars['roomNumber']->value){?>
                                <option <?php if ($_smarty_tpl->tpl_vars['i']->value==$_smarty_tpl->tpl_vars['roomData']->value[$_smarty_tpl->tpl_vars['k']->value]['adults']){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option>
                            <?php }elseif($_smarty_tpl->tpl_vars['previousSearch']->value==true&&$_smarty_tpl->tpl_vars['k']->value>$_smarty_tpl->tpl_vars['roomNumber']->value){?>
                                <option <?php if ($_smarty_tpl->tpl_vars['i']->value==2){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option>
                            <?php }?>
                        <?php }} ?>
                    </select>
                </div>
                    
                <div class="children">
                    <?php if ($_smarty_tpl->tpl_vars['k']->value==1){?><span class="label">Children <span>(0-17) </span></span><?php }?>
                    
                    <select id="rooms<?php echo $_smarty_tpl->tpl_vars['k']->value-1;?>
childrenCount" name="room<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
[childrenCount]" onchange="add_child(<?php echo $_smarty_tpl->tpl_vars['k']->value-1;?>
)">
                        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['i']->step = 1;$_smarty_tpl->tpl_vars['i']->total = (int)ceil(($_smarty_tpl->tpl_vars['i']->step > 0 ? 3+1 - (0) : 0-(3)+1)/abs($_smarty_tpl->tpl_vars['i']->step));
if ($_smarty_tpl->tpl_vars['i']->total > 0){
for ($_smarty_tpl->tpl_vars['i']->value = 0, $_smarty_tpl->tpl_vars['i']->iteration = 1;$_smarty_tpl->tpl_vars['i']->iteration <= $_smarty_tpl->tpl_vars['i']->total;$_smarty_tpl->tpl_vars['i']->value += $_smarty_tpl->tpl_vars['i']->step, $_smarty_tpl->tpl_vars['i']->iteration++){
$_smarty_tpl->tpl_vars['i']->first = $_smarty_tpl->tpl_vars['i']->iteration == 1;$_smarty_tpl->tpl_vars['i']->last = $_smarty_tpl->tpl_vars['i']->iteration == $_smarty_tpl->tpl_vars['i']->total;?>
                            <?php if ($_smarty_tpl->tpl_vars['previousSearch']->value==false){?>
                                <option <?php if ($_smarty_tpl->tpl_vars['i']->value==0){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option>
                            <?php }elseif($_smarty_tpl->tpl_vars['previousSearch']->value==true&&$_smarty_tpl->tpl_vars['k']->value<=$_smarty_tpl->tpl_vars['roomNumber']->value){?>
                                <option <?php if ($_smarty_tpl->tpl_vars['i']->value==$_smarty_tpl->tpl_vars['roomData']->value[$_smarty_tpl->tpl_vars['k']->value]['childrenNr']){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option>
                            <?php }elseif($_smarty_tpl->tpl_vars['previousSearch']->value==true&&$_smarty_tpl->tpl_vars['k']->value>$_smarty_tpl->tpl_vars['roomNumber']->value){?>
                                <option <?php if ($_smarty_tpl->tpl_vars['i']->value==0){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option>
                            <?php }?>
                        <?php }} ?>
                    </select>
                </div>

                <div class="age">
                    <?php if ($_smarty_tpl->tpl_vars['k']->value==1){?><legend id="age_label">&nbsp; Age <br></legend><?php }?>
                    <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['j']->step = 1;$_smarty_tpl->tpl_vars['j']->total = (int)ceil(($_smarty_tpl->tpl_vars['j']->step > 0 ? 3+1 - (1) : 1-(3)+1)/abs($_smarty_tpl->tpl_vars['j']->step));
if ($_smarty_tpl->tpl_vars['j']->total > 0){
for ($_smarty_tpl->tpl_vars['j']->value = 1, $_smarty_tpl->tpl_vars['j']->iteration = 1;$_smarty_tpl->tpl_vars['j']->iteration <= $_smarty_tpl->tpl_vars['j']->total;$_smarty_tpl->tpl_vars['j']->value += $_smarty_tpl->tpl_vars['j']->step, $_smarty_tpl->tpl_vars['j']->iteration++){
$_smarty_tpl->tpl_vars['j']->first = $_smarty_tpl->tpl_vars['j']->iteration == 1;$_smarty_tpl->tpl_vars['j']->last = $_smarty_tpl->tpl_vars['j']->iteration == $_smarty_tpl->tpl_vars['j']->total;?>
                    
                        <?php if ($_smarty_tpl->tpl_vars['previousSearch']->value==false){?>
                            <select id="rooms<?php echo $_smarty_tpl->tpl_vars['k']->value-1;?>
children<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
"  style="display:none" name="room<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
[children<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
]">
                                <!--<option value="">&mdash;</option>-->
                                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['i']->step = 1;$_smarty_tpl->tpl_vars['i']->total = (int)ceil(($_smarty_tpl->tpl_vars['i']->step > 0 ? 17+1 - (0) : 0-(17)+1)/abs($_smarty_tpl->tpl_vars['i']->step));
if ($_smarty_tpl->tpl_vars['i']->total > 0){
for ($_smarty_tpl->tpl_vars['i']->value = 0, $_smarty_tpl->tpl_vars['i']->iteration = 1;$_smarty_tpl->tpl_vars['i']->iteration <= $_smarty_tpl->tpl_vars['i']->total;$_smarty_tpl->tpl_vars['i']->value += $_smarty_tpl->tpl_vars['i']->step, $_smarty_tpl->tpl_vars['i']->iteration++){
$_smarty_tpl->tpl_vars['i']->first = $_smarty_tpl->tpl_vars['i']->iteration == 1;$_smarty_tpl->tpl_vars['i']->last = $_smarty_tpl->tpl_vars['i']->iteration == $_smarty_tpl->tpl_vars['i']->total;?>
                                    <?php if ($_smarty_tpl->tpl_vars['i']->value==0){?> <option value="0">&lt;1</option> <?php }else{ ?>
                                    <option <?php if ($_smarty_tpl->tpl_vars['i']->value==7){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option><?php }?>
                                <?php }} ?>
                            </select>        
                            
                        <?php }elseif($_smarty_tpl->tpl_vars['previousSearch']->value==true&&$_smarty_tpl->tpl_vars['k']->value<=$_smarty_tpl->tpl_vars['roomNumber']->value){?>
                            <select id="rooms<?php echo $_smarty_tpl->tpl_vars['k']->value-1;?>
children<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
"  <?php if ($_smarty_tpl->tpl_vars['j']->value>$_smarty_tpl->tpl_vars['roomData']->value[$_smarty_tpl->tpl_vars['k']->value]['childrenNr']){?> style="display:none" <?php }?> name="room<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
[children<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
]">
                                <!--<option value="">&mdash;</option>-->
                                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['i']->step = 1;$_smarty_tpl->tpl_vars['i']->total = (int)ceil(($_smarty_tpl->tpl_vars['i']->step > 0 ? 17+1 - (0) : 0-(17)+1)/abs($_smarty_tpl->tpl_vars['i']->step));
if ($_smarty_tpl->tpl_vars['i']->total > 0){
for ($_smarty_tpl->tpl_vars['i']->value = 0, $_smarty_tpl->tpl_vars['i']->iteration = 1;$_smarty_tpl->tpl_vars['i']->iteration <= $_smarty_tpl->tpl_vars['i']->total;$_smarty_tpl->tpl_vars['i']->value += $_smarty_tpl->tpl_vars['i']->step, $_smarty_tpl->tpl_vars['i']->iteration++){
$_smarty_tpl->tpl_vars['i']->first = $_smarty_tpl->tpl_vars['i']->iteration == 1;$_smarty_tpl->tpl_vars['i']->last = $_smarty_tpl->tpl_vars['i']->iteration == $_smarty_tpl->tpl_vars['i']->total;?>
                                    <?php if ($_smarty_tpl->tpl_vars['i']->value==0){?> <option <?php if ($_smarty_tpl->tpl_vars['childrenAge']->value[$_smarty_tpl->tpl_vars['k']->value-1][$_smarty_tpl->tpl_vars['j']->value-1]==$_smarty_tpl->tpl_vars['i']->value){?> selected="selected" <?php }?> value="0">&lt;1</option> <?php }else{ ?>
                                    <option <?php if ($_smarty_tpl->tpl_vars['childrenAge']->value[$_smarty_tpl->tpl_vars['k']->value-1][$_smarty_tpl->tpl_vars['j']->value-1]==$_smarty_tpl->tpl_vars['i']->value){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option><?php }?>
                                <?php }} ?>
                            </select>
                            
                        <?php }elseif($_smarty_tpl->tpl_vars['previousSearch']->value==true&&$_smarty_tpl->tpl_vars['k']->value>$_smarty_tpl->tpl_vars['roomNumber']->value){?>
                            <select id="rooms<?php echo $_smarty_tpl->tpl_vars['k']->value-1;?>
children<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
"  style="display:none" name="room<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
[children<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
]">
                                <!--<option value="">&mdash;</option>-->
                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['i']->step = 1;$_smarty_tpl->tpl_vars['i']->total = (int)ceil(($_smarty_tpl->tpl_vars['i']->step > 0 ? 17+1 - (0) : 0-(17)+1)/abs($_smarty_tpl->tpl_vars['i']->step));
if ($_smarty_tpl->tpl_vars['i']->total > 0){
for ($_smarty_tpl->tpl_vars['i']->value = 0, $_smarty_tpl->tpl_vars['i']->iteration = 1;$_smarty_tpl->tpl_vars['i']->iteration <= $_smarty_tpl->tpl_vars['i']->total;$_smarty_tpl->tpl_vars['i']->value += $_smarty_tpl->tpl_vars['i']->step, $_smarty_tpl->tpl_vars['i']->iteration++){
$_smarty_tpl->tpl_vars['i']->first = $_smarty_tpl->tpl_vars['i']->iteration == 1;$_smarty_tpl->tpl_vars['i']->last = $_smarty_tpl->tpl_vars['i']->iteration == $_smarty_tpl->tpl_vars['i']->total;?>
                                <?php if ($_smarty_tpl->tpl_vars['i']->value==0){?> <option value="0">&lt;1</option> <?php }else{ ?>
                                <option <?php if ($_smarty_tpl->tpl_vars['i']->value==7){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option><?php }?>
                            <?php }} ?>
                            </select>
                        <?php }?>
                        
                    <?php }} ?>
                </div>
            </div>
        <?php }} ?>

    </div>
    <div id="add_new_room_search_div">
        <table id="buttons_search_add">
            <tr>
                <td align="left">
                    <label>Number of rooms:</label>
                    <select id="room_number"  style="display: inline;" name="room_noumber" onchange="add_room()">
                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['i']->step = 1;$_smarty_tpl->tpl_vars['i']->total = (int)ceil(($_smarty_tpl->tpl_vars['i']->step > 0 ? 8+1 - (1) : 1-(8)+1)/abs($_smarty_tpl->tpl_vars['i']->step));
if ($_smarty_tpl->tpl_vars['i']->total > 0){
for ($_smarty_tpl->tpl_vars['i']->value = 1, $_smarty_tpl->tpl_vars['i']->iteration = 1;$_smarty_tpl->tpl_vars['i']->iteration <= $_smarty_tpl->tpl_vars['i']->total;$_smarty_tpl->tpl_vars['i']->value += $_smarty_tpl->tpl_vars['i']->step, $_smarty_tpl->tpl_vars['i']->iteration++){
$_smarty_tpl->tpl_vars['i']->first = $_smarty_tpl->tpl_vars['i']->iteration == 1;$_smarty_tpl->tpl_vars['i']->last = $_smarty_tpl->tpl_vars['i']->iteration == $_smarty_tpl->tpl_vars['i']->total;?>
                        <option <?php if ($_smarty_tpl->tpl_vars['i']->value==$_smarty_tpl->tpl_vars['roomNumber']->value){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</option>
                    <?php }} ?>
                </select>

					</td>
                <td align="right">
                    <input id="search_button" type="button" value="Search" onclick="search_validate()" />
                </td>
        </table>
    </div>
</form>
<script type="text/javascript">
	//reset();//reset the values of the controls
</script>
</div><?php }} ?>